package com.camel.chart.utils.entity;

import lombok.Data;

import java.util.Collection;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

@Data
public class ChartHistory {
    private volatile static ChartHistory instance;

    private Map<String, Collection<Msg>> msges;

    public static synchronized ChartHistory getInstance() {
        if (instance == null) {
            synchronized (ChartHistory.class) {
                if (instance == null) {
                    instance = new ChartHistory();
                    instance.setMsges(new HashMap<>());
                }
            }
        }
        return instance;
    }
}
